package mediator;

import java.util.ArrayList;
import java.util.List;

public class ConcreteMediator extends Mediator{

    @Override
    public void add(Shop shop) {
        shops.add(shop);
    }

    @Override
    public void notice(String shopName, String foodName) {
        for(Shop shop: shops){
            if(shop.getName().equals(shopName)){
                shop.action(foodName);
                return;
            }
        }
        System.out.println(shopName + "未开店");
    }

}
